﻿using MVC_basic.Helpers;
using System;
using System.Collections.Generic;
using System.IO.Compression;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AppsApi.Controllers
{
    public class CreateCajaAppController : Controller
    {
        [HttpPost]
        public bool Index(string appId)
        {
            HttpPostedFileBase fileurl = null;
            foreach (string file in Request.Files)
            {
                fileurl = Request.Files[file];
            }
            ZipArchive zipFile = new ZipArchive(fileurl.InputStream);
            UnZipper.unzip(zipFile, appId);
            return true;
        }

    }
}
